/**
 * @author Sebastian
 * @version 2.0
 * @date 2024/6/26 21:42
 */
// x的平方根
public class Solution69 {
    public int mySqrt(int x) {
        if (x <= 1) return x;
        for (int i = 1; i <= x/2; i++) {
            if (x / i == i || x / (i + 1) == i) return i;
        }
        return -1;
    }
}
